/*
 * Iterator.cpp
 *
 *  Created on: Sep 21, 2009
 *      Author: jbarreneche
 */

#include "PathIterator.h"

namespace path {

Iterator::Iterator(util::LinkedList<Edge>::Iterator iteratedPath) :
iterator(iteratedPath) { }

Iterator::~Iterator() { }

void Iterator::next(){
	this->currentEdge = this->iterator.next();
}

bool Iterator::hasNext(){
	return this->iterator.hasNext();
}

Vertex* Iterator::currentVertex(){
	return this->transversingEdge()->getOrigin();
}
// Arista que se va a atravesar para llegar al proximo vertice
Edge* Iterator::transversingEdge() {
	return this->currentEdge;
}
// Vertice destino de la arista que se atraviesa
Vertex* Iterator::nextVertex(){
	return this->transversingEdge()->getDestination();
}

}
